package cn.edu.seu.ssny.service;

import cn.edu.seu.ssny.entity.Device;
import cn.edu.seu.ssny.entity.Project;
import cn.edu.seu.ssny.entity.StatisticsConfig;
import cn.edu.seu.ssny.entity.StatisticsType;
import cn.edu.seu.ssny.service.support.IBaseService;

import java.util.List;

public interface IStatisticsConfigService extends IBaseService<StatisticsConfig, Long> {

    /**
     * 功能描述:
     * <根据项目和统计类型查询出所有需要被统计的配置项
     *
     * @param project
     * @param statisticsTypeId
     * @return
     */
    List<StatisticsConfig> getDeviceIdsByProjectIdAndStatisticsTypeId(Project project, Integer statisticsTypeId);

    /**
     * 功能描述:
     * <根据统计类型ID查询出所有需要被统计的采集点ID
     *
     * @param statisticsTypeId
     * @return
     */
    List<Integer> getDeviceIdsByStatisticsType(int statisticsTypeId);


    /**
     * 功能描述:
     * <根据指定的条件查询分析配置项
     *
     * @param statisticsTypeId
     * @param project
     * @return
     */
    StatisticsConfig findByStatisticsTypeIdAndProjectAndDevice(Integer statisticsTypeId, Project project, Device device);
}
